package com.qzxy.premiumhotelsystem.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @TableName orders
 */
@TableName(value ="orders")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Orders implements Serializable {


    @TableId(type = IdType.INPUT)
    private String orderId;

    private Integer guestId;

    private Integer roomId;

    private BigDecimal price;

    private Integer vipTypeId;

    private BigDecimal actuallyPrice;

    private String status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkInTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkOutTime;

    private Integer durationDay;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Version
    @JsonIgnore
    private Integer version;

    private static final long serialVersionUID = 1L;
}